package com.yuanfeng.payment.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yuanfeng.payment.dto.GoodsDTO;
import com.yuanfeng.payment.dto.RecordDTO;
import com.yuanfeng.payment.entity.PayConsumeTradeBackEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Map;

/**
 * @Entity com.yuanfeng.payment.entity.PayConsumeTradeBack
 */
@Mapper
public interface PayConsumeTradeBackMapper extends BaseMapper<PayConsumeTradeBackEntity> {


    /**
     * 查询订单描述
     *
     * @param orderId
     * @param userId
     * @return
     */
    GoodsDTO queryGoodsPriceAndName(@Param("orderId") String orderId, @Param("userId") String userId);

    /**
     * 为虚拟拟订单添加兑换码
     *
     * @param param
     */
    void addRedeemCode(@Param("param") Map<String, Object> param);

    /**
     * 查询金额和名称
     *
     * @param outTradeNo
     * @return
     */
    RecordDTO queryRecordPriceAndName(@Param("outTradeNo") String outTradeNo);

    /**
     * 更新消费信息
     *
     * @param mapDigital
     * @return
     */
    boolean updateConsumeTradeByPureDigital(Map<String, Object> mapDigital);

    /**
     * 更新消费
     *
     * @param mapDigital
     * @return
     */
    boolean updateConsumeTrade(Map<String, Object> mapDigital);

    /**
     * 查询金额
     *
     * @param orderId
     * @return
     */
    RecordDTO queryRecordPriceAndNameByTradeId(@Param("orderId") String orderId);

    /**
     * 查询店铺
     *
     * @param orderId
     * @return
     */
    String queryTreasureShopIdByInt(@Param("orderId") String orderId);
}




